package com.kuang.design.creation.factory.factorymethod;

/**
 * 工厂方法模式
 */
public class MainTest {
    public static void main(String[] args) {
        VanCarFactory vanCarFactory = new VanCarFactory();
        AbstractCar van = vanCarFactory.newCar();
        van.run();

        RaceCarFactory raceCarFactory = new RaceCarFactory();
        AbstractCar race = raceCarFactory.newCar();
        race.run();


    }
}
